import request from "@/utils/request";

const api_name = `/api/ucenter/wx`;

export default {
  getLoginParam() {
    return request({
      url: `${api_name}/getLoginParam`,
      method: `get`,
    });
  },

  // 根据订单下单，创建支付记录，调用微信官方支付
  createNative(orderId) {
    return request({
      url: `/api/order/weixin/createNative/${orderId}`,
      method: "get",
    });
  },

  // 轮询微信官方支付状态
  queryPayStatus(orderId) {
        return request({
            url: `/api/order/weixin/queryPayStatus/${orderId}`,
            method: 'get'
        })
    },
};
